<template>
  <div class="priceset">
    <!-- 基本信息 -->
    <div
      v-for="item in pricesetdata"
      :key="item.index"
      class="information">
      <span>{{ item.title }}</span>：
      <span>{{ item.text }}</span>
    </div>
    <!-- 销售价格 -->
    <template>
      <!-- <div class="Priceinformation"> -->
      <div
        class="information"
        v-for="item in pricedata"
        :key="item.index">
        <div
          class="input-corver"
          @click.stop="editPrice(scope, 'purchasePriceBol')">
          {{ item.title }}
          <el-input-number
            size="mini"
            v-model="item.text"
            :precision="2"
            :step="1"
            :max="9999999"
          />
        </div>
      </div>
      <div class="isCommonPromotionPrice">
        <el-checkbox v-model="isCommonPromotionPrice">启用销售通用促销价格</el-checkbox>
      </div>
      <!-- </div> -->
    </template>
    <!-- <div class="saleprice">
      <el-input-number
        size="mini"
        v-model="pricedata.text"
        :precision="2"
        :step="1"
        :max="9999999"
      />
    </div>-->
    <!-- 采购价格 -->
    <div class="purchasedprice"/>
  </div>
</template>

<script>
import { isObject, cloneDeep } from 'lodash'
export default {
  props: {
    // 展示内容
    data: {
      type: Object,
      default: () => []
    }
  },
  data () {
    return {
      pricesetdata: [],
      pricedata: [],
      isCommonPromotionPrice: false
    }
  },
  watch: {
    data: {
      immediate: true,
      handler (val) {
        this.datafun(val)
      }
    }
  },
  methods: {
    datafun (item) {
      this.pricesetdata = item.priceSetData
      this.pricedata = item.priceData
      console.log('xczxc', this.pricedata)
    }
  }
}
</script>

<style lang='less'>
.priceset {
  overflow: hidden;

  .information {
    float: left;
    width: 300px;
    padding: 10px;

    .input-corver {
      width: 280px;
    }
  }

  .isCommonPromotionPrice {
    margin-top: 55px;
  }
}
</style>
